$OpenBSD: patch-tornado_test_process_test_py,v 1.1 2014/04/28 20:52:13 edd Exp $

Patch broken subprocess tests.

--- tornado/test/process_test.py.orig	Sun Apr 27 15:13:04 2014
+++ tornado/test/process_test.py	Sun Apr 27 15:17:06 2014
@@ -149,7 +149,7 @@ class SubprocessTest(AsyncTestCase):
                              stdin=Subprocess.STREAM,
                              stdout=Subprocess.STREAM, stderr=subprocess.STDOUT,
                              io_loop=self.io_loop)
-        self.addCleanup(lambda: os.kill(subproc.pid, signal.SIGTERM))
+        #self.addCleanup(lambda: os.kill(subproc.pid, signal.SIGTERM))
         subproc.stdout.read_until(b'>>> ', self.stop)
         self.wait()
         subproc.stdin.write(b"print('hello')\n")
@@ -159,7 +159,7 @@ class SubprocessTest(AsyncTestCase):
 
         subproc.stdout.read_until(b">>> ", self.stop)
         self.wait()
-        subproc.stdin.write(b"raise SystemExit\n")
+        subproc.stdin.write(b"raise SystemExit\n") # subproc dies itself here
         subproc.stdout.read_until_close(self.stop)
         data = self.wait()
         self.assertEqual(data, b"")
@@ -170,10 +170,10 @@ class SubprocessTest(AsyncTestCase):
                              stdin=Subprocess.STREAM,
                              stdout=Subprocess.STREAM, stderr=subprocess.STDOUT,
                              io_loop=self.io_loop)
-        self.addCleanup(lambda: os.kill(subproc.pid, signal.SIGTERM))
+        #self.addCleanup(lambda: os.kill(subproc.pid, signal.SIGTERM))
         subproc.stdout.read_until(b'>>> ', self.stop)
         self.wait()
-        subproc.stdin.close()
+        subproc.stdin.close() # subproc dies on its own after this line
         subproc.stdout.read_until_close(self.stop)
         data = self.wait()
         self.assertEqual(data, b"\n")
